/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.service;

import cn.hutool.poi.excel.ExcelWriter;
import com.yami.shop.bean.model.Product;
import com.yami.shop.bean.param.*;
import com.yami.shop.bean.vo.search.ProductSearchVO;
import com.yami.shop.common.util.PageParam;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 商品
 * @author yami
 */
public interface ProductExcelService{



    ExcelWriter getProdExcelWriter(Long shopId);


    int writerProdToExcel(List<ProductExportParam> products, ExcelWriter writer, Long shopId, Integer row);

    /**
     * 下载模板
     * @param response 响应信息
     * @param shopId 店铺id
     */
    void downloadModel(HttpServletResponse response, Long shopId);

    /**
     * 导入文件
     * @param excelFile 前端传过来的文件信息
     * @param shopId 店铺id
     * @param isSameCity 是否开启同城配送
     * @param employeeId 员工id
     * @param prodIds 导入成功后生成的商品id集合
     * @return 结果
     * @throws Exception 异常
     */
    Object parseFile(MultipartFile excelFile, Long shopId, Long employeeId, List<Long> prodIds,boolean isSameCity) throws Exception;


    /**
     * 导出商品洞察信息
     * @param response
     * @param param
     * @param dbLang
     */
    void prodEffectExport(HttpServletResponse response, ProdEffectParam param, Integer dbLang);


    /**
     * 添加商品模板的下拉数量列表
     * @param shopId
     * @param sheet
     * @param workbook
     */
    void dropDownList(Long shopId, Sheet sheet, Workbook workbook);

}
